import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'


Vue.use(VueRouter)

const routes = [

  {
    path: '/',
    name: 'Home',
    component: Home,
    children: [
      {
        path: '/',
        redirect: '/house',
        name: 'House',

      },
      {
        path: '/house',
        name: 'House',
        component: () => import('../views/House.vue')
      },
      {
        path: '/zhibo',
        name: 'ZhiBo',
        component: () => import('../views/ZhiBo.vue')
      },
      {
        path: '/tuangou',
        name: 'TuanGou',
        component: () => import('../views/TuanGou.vue')
      },
      {
        path: '/shenhe',
        name: 'ShenHe',
        component: () => import('../views/ShenHe.vue')
      },
      {
        path: '/dingdan',
        name: 'DingDan',
        component: () => import('../views/DingDan.vue')
      },
      {
        path: '/zixun',
        name: 'ZiXun',
        component: () => import('../views/ZiXun.vue')
      },
      {
        path: '/person',
        name: 'person',
        component: () => import('../views/person.vue')
      }
    ]
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login.vue')
  },
  {
    path: '/danmu',
    name: 'DanMu',
    component: () => import('../views/DanMu.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
